//package com.sch.www;
//
//import com.alibaba.ttl.TransmittableThreadLocal;
//import com.alibaba.ttl.TtlRunnable;
//
//import java.util.concurrent.ExecutorService;
//import java.util.concurrent.Executors;
//
//
//public class ag {
////    ThreadLocal<String> parent = new ThreadLocal<String>();
////    ThreadLocal<String> parent = new InheritableThreadLocal<>();
//    ThreadLocal<String> parent = new TransmittableThreadLocal<>();
//
//
//    public void a() {
//        parent.set("value-set-in-parent");
//        Thread.interrupted()
//        ExecutorService executorService = Executors.newFixedThreadPool(4);
//        Runnable runnable = () -> {
//
//            String s = "1子线程：" + Thread.currentThread().getName() + "  value:" + parent.get();
//            parent.set(Thread.currentThread().getName());
//            s += "\r\n2子线程：" + Thread.currentThread().getName() + "  value:" + parent.get();
//            s += "\r\n======================================================";
//            System.out.println(s);
//        };
//
//        //额外的处理，生成修饰了的对象ttlRunnable
//        runnable = TtlRunnable.get(runnable);
//        for (int i = 0; i < 8; i++) {
//            executorService.submit(runnable);
//        }
//    }
//
//
//    public static void main(String args[]) {
//        new ag().a();
//    }
//
//
//}
//
